Skip to content

fix(cloudflare): Capture NonRetryableError before the final workflow step attempt - #26161

Merged
chargome merged 1 commit into
developfrom
fix-cf-workflow-capture
Nov 6, 2026
Merged

chargome merged 1 commit into
developfrom
fix-cf-workflow-capture

Conversation

@chargome

@chargome chargome commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Since #21025, instrumentWorkflowWithSentry only captures a step error once retries are exhausted. A NonRetryableError ends the instance on an earlier attempt, so it was never reported. We now also capture errors the Workflows engine treats as non-retryable, using the engine's own rule (name === 'NonRetryableError' or a message starting with NonRetryableError) so we don't import cloudflare:workflows at runtime.

Closes #26091

…rkflow step attempt

Step errors were only captured once retries were exhausted, but a NonRetryableError
ends the instance on an earlier attempt, so it was never reported. Also capture
errors the Workflows engine treats as non-retryable (name or message prefix).

Fixes #26091
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chargome chargome self-assigned this Nov 6, 2026
@chargome

chargome commented Nov 6, 2026

Copy link
Copy Markdown
Member Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 39f0684. Configure here.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: f325269 (PR test merge using develop at 4c9a4eb)

Against: 4c9a4eb (develop) · base run #65205

✅ Baseline matches: this diff contains only this PR's changes.

Path Size % Change Change
@sentry/browser 30.4 kB - -
@sentry/browser - with treeshaking flags 28.54 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.43 kB - -
@sentry/browser (incl. Tracing) 52.73 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.73 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.7 kB - -
@sentry/browser (incl. Tracing, Replay) 93.03 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.63 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 97.78 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 110.77 kB - -
@sentry/browser (incl. Feedback) 47.98 kB - -
@sentry/browser (incl. sendFeedback) 35.5 kB - -
@sentry/browser (incl. FeedbackAsync) 40.61 kB - -
@sentry/browser (incl. Metrics) 31.44 kB - -
@sentry/browser (incl. Logs) 31.73 kB - -
@sentry/browser (incl. Metrics & Logs) 32.45 kB - -
@sentry/react 32.29 kB - -
@sentry/react (incl. Tracing) 55.1 kB - -
@sentry/vue 38.67 kB - -
@sentry/vue (incl. Tracing) 55.75 kB - -
@sentry/svelte 30.43 kB - -
@sentry/remix (Remix 3 client bundle) 57.82 kB - -
CDN Bundle 32.2 kB - -
CDN Bundle (incl. Tracing) 53.26 kB - -
CDN Bundle (incl. Logs, Metrics) 34.47 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 55.2 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 75.88 kB - -
CDN Bundle (incl. Tracing, Replay) 91.47 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 93.4 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 97.58 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.58 kB - -
CDN Bundle - uncompressed 94.67 kB - -
CDN Bundle (incl. Tracing) - uncompressed 157.67 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 101.14 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 163.41 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 232.71 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 279.36 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 285.08 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 293.06 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 298.77 kB - -
@sentry/nextjs (client) 58.05 kB - -
@sentry/sveltekit (client) 53.24 kB - -
@sentry/core/server 44.25 kB - -
@sentry/core/browser 13.93 kB - -
@sentry/node 156.97 kB +0.02% +21 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 82.28 kB - -
@sentry/node - without tracing 97.05 kB +0.03% +22 B 🔺
@sentry/node - without channel injection 137.31 kB +0.02% +19 B 🔺
@sentry/aws-serverless 105.41 kB +0.03% +22 B 🔺
@sentry/cloudflare (withSentry) - minified 200.83 kB +0.08% +146 B 🔺
@sentry/cloudflare (withSentry) 499.3 kB +0.05% +249 B 🔺
@sentry/nextjs/cloudflare (withSentry) - minified 222.68 kB - -

View base workflow run

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Optional E2E tests

Some optional checks were not successful. They do not block the merge. 3 not successful, 25 successful. See the run.

Check Status
⛔ CI: Optional E2E Tests / E2E nextjs-16-cacheComponents (cloudflare) Test (optional) Cancelled after 15m Details
❌ CI: Optional E2E Tests / E2E cloudflare-flue-send-to-sentry Test (optional) Failing after 3m Details
❌ CI: Optional E2E Tests / E2E cloudflare-pi-durable (latest) Test (optional) Failing after 10m Details
Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E cloudflare-agent Test (optional) Successful in 45s Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps kept) Test (optional) Successful in 42s Details
✅ CI: Optional E2E Tests / E2E cloudflare-think (ai v6) Test (optional) Successful in 58s Details
✅ CI: Optional E2E Tests / E2E cloudflare-pi-durable Test (optional) Successful in 57s Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (turbo) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (cloudflare, latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E cloudflare-workers-send-to-sentry Test (optional) Successful in 4m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (latest) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext, bun) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-14 (latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-orpc Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E supabase-nextjs Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (deno) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-cloudflare Test (optional) Successful in 55s Details
✅ CI: Optional E2E Tests / E2E nuxt-5 Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16-tunnel (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (tunnel-dev) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (static / nuxt generate) Test (optional) Successful in 54s Details
✅ CI: Optional E2E Tests / E2E cloudflare-mastra Test (optional) Successful in 10m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps Test (optional) Successful in 41s Details
✅ CI: Optional E2E Tests / E2E cloudflare-think Test (optional) Successful in 57s Details

@chargome
chargome marked this pull request as ready for review November 6, 2026 10:41
@chargome
chargome requested a review from a team as a code owner November 6, 2026 10:41
@chargome
chargome requested review from JPeer264, andreiborza, isaacs, mydea and nicohrubec and removed request for a team and mydea November 6, 2026 10:41
@chargome
chargome merged commit b2f4254 into develop Nov 6, 2026
205 of 208 checks passed
@chargome
chargome deleted the fix-cf-workflow-capture branch November 6, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Cloudflare] instrumentWorkflowWithSentry does not capture a NonRetryableError thrown before the final attempt

2 participants